package com.buaa.airticketbookingsystem.Service.UserServiceImpl;

import com.buaa.airticketbookingsystem.Dao.AdminDao;
import com.buaa.airticketbookingsystem.Entity.Administrator;
import com.buaa.airticketbookingsystem.Service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminServiceImpl implements AdminService {

    @Autowired
    private AdminDao adminDao;

    @Override
    public Administrator selectAdminByEmail(String email) {
        return adminDao.selectAdminByEmail(email);
    }

    @Override
    public void registerNewAdmin(Administrator admin) {
        adminDao.registerNewAdmin(admin);
    }

    @Override
    public void changeAdminPassword(String email, String new_password) {
        adminDao.changeAdminPassword(email, new_password);
    }


}
